<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>设备管理</title>
<script type="text/javascript" src="../js/jquery-1.11.0.min.js"></script>
<script type="text/javascript">
	$(document).ready(function() {

		$('#sect1').blur(function(){
			var sect1=document.getElementById('sect1').value;
			getSect1(sect1)
		})
		
		$('#search').blur(function(){
			var search=document.getElementById('search').value;
			getSearch(search)
		})
	})
	
	function getSearch(search){
		$.ajax({
			type:'post',
			url:'${pageContext.request.contextPath}/equipment/getSearch.action',
			data:'search='+search,
			success:function(data){
				
			}
		})
	}

	function getSect1(sect1){
		$.ajax({
			type:'post',
			url:'${pageContext.request.contextPath}/equipment/getSect1.action',
			data:'sect1='+sect1,
			success:function(data){
				
			}
		})
	}
	function getradio() {

		var radioval = $('#wrap input[name="payMethod"]:checked ').val();
		setSwift(radioval)
	}
	
	function setSwift(data){
		$.ajax({
			type:'post',
			url:'${pageContext.request.contextPath}/equipment/setSwift.action',
			data:'swift='+data,
			success:function(data){
				setList()
			}			
		})		
	}
	
	function getList(){
		$.ajax({
			type:'post',
			url:'${pageContext.request.contextPath}/equipment/getList.action',
			success:function(data){
				init()
			}
		})
	}
	
	function nextPage(end) {
		$.ajax({
			type:'post',
			url:'${pageContext.request.contextPath}/equipment/nextPage.action',
			data:'end='+end,
			success:function(data){
				init()
			}
		})
	}
	
	function lastPage(begin){
		$.ajax({
			type:'post',
			url:'${pageContext.request.contextPath}/equipment/lastPage.action',
			data:'begin='+begin,
			success:function(data){
				init()
			}
		})
	}
	function setList(){
		$.ajax({
			type:'post',
			url:'${pageContext.request.contextPath}/equipment/setList.action',
			success:function(data){
				init()
			}
		})
	}
	
	function setIndex(){
		$.ajax({
			type:'post',
			url:'${pageContext.request.contextPath}/equipment/setIndex.action',
			success:function(data){
				init()
			}
		})
	}
	
	function searchEquip(){
		$.ajax({
			type:'post',
			url:'${pageContext.request.contextPath}/equipment/searchEquip.action',
			success:function(data){
				init()
			}
		})
	}	
	
	function init() {
		equipmanage();
	}
</script>
</head>
<body id="body">
	<div class="row">
     <div class="col-md-12">
         <!--breadcrumbs start -->
         <ul class="breadcrumb">
             <li><a href="javascript:void(0)">能源管理系统</a>
             </li>
             <li>数据中心</li>
             <li><a href="javascript:void(0)">能源使用情况</a></li>
         </ul>

		<iframe src="${pageContext.request.contextPath}/jsp/machine.jsp"
		id="myiframe" scrolling="no" frameborder="0"
		style="width: 1200px; height: 2000px;">这是A</iframe>
	

	</div>
</div>

</div>
</body>
</html>